<?php

class Phrase extends Zend_Db_Table
{
    protected $_name = 'phrases';
    
    public function getRandom()
    {
        $select = $this->getAdapter();
        $prepare = $select->query('
                SELECT phrase
                FROM phrases 
                ORDER BY RAND()
                LIMIT 1');
        $result = $prepare->fetchAll(Zend_Db::FETCH_ASSOC);
        return $result[0]['phrase'];
    }
    
}
